Bind php-fpm to all interfaces by default#63
Merged
Conversation
Upstream php:*-fpm moved the listen directive from zz-docker.conf into docker.conf, so our www.conf (written by entrypoint) is now the last file to set listen and its 127.0.0.1:9000 value takes effect. That breaks web->php connectivity in multi-container setups. Default to listen = 9000 so other containers can reach php-fpm; users can still lock it down via PHP_FPM_OVERRIDE. Co-Authored-By: Oz <oz-agent@warp.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After a fresh pull of
croneu/phpapp-fpm, other containers can no longer reach php-fpm:Inside the php container, php-fpm is bound to
127.0.0.1:9000instead of0.0.0.0:9000.Root cause
The entrypoint has always written
listen = 127.0.0.1:9000into/usr/local/etc/php-fpm.d/www.conf. This used to be harmless because the upstreamphp:*-fpmimage shippedzz-docker.confwithlisten = 9000, which — being alphabetically last — overrode our value and bound php-fpm to all interfaces.Upstream has since moved the
listendirective out ofzz-docker.confand intodocker.conf:Load order is now
docker.conf→www.conf→zz-docker.conf, so ourwww.confwins with127.0.0.1:9000andzz-docker.confno longer provides an overridinglisten. Net effect: php-fpm silently flipped to localhost-only.Change
Default the pool to
listen = 9000in both the entrypoint template andfiles/php-fpm-www.conf. Users who want to restrict the bind address can still do so viaPHP_FPM_OVERRIDE.Generated by Oz.